<!DOCTYPE html>
<html lang="en">
    <head>        
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />    
        <!--[if gt IE 8]>
            <meta http-equiv="X-UA-Compatible" content="IE=edge" />        
        <![endif]-->                
        <title>Sistema de Facturacion VIVA</title>
        <link rel="icon" type="image/ico" href="favicon.ico"/>

        <link href="<?php echo $this->webroot; ?>css/stylesheets.css" rel="stylesheet" type="text/css" />
        <!--[if lte IE 7]>
            <link href="css/ie.css" rel="stylesheet" type="text/css" />
            <script type='text/javascript' src='js/plugins/other/lte-ie7.js'></script>
        <![endif]-->    
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/jquery/jquery-1.9.1.min.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/jquery/jquery-ui-1.10.1.custom.min.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/jquery/jquery-migrate-1.1.1.min.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/jquery/globalize.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/other/excanvas.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/maskedinput/jquery.maskedinput-1.3.min.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/other/jquery.mousewheel.min.js'></script>

        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/bootstrap/bootstrap.min.js'></script>

        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/cookies/jquery.cookies.2.2.0.min.js'></script>    

        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/jflot/jquery.flot.js'></script>    
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/jflot/jquery.flot.stack.js'></script>    
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/jflot/jquery.flot.pie.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/jflot/jquery.flot.resize.js'></script>

        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/epiechart/jquery.easy-pie-chart.js'></script>    
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/sparklines/jquery.sparkline.min.js'></script>        

        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/mcustomscrollbar/jquery.mCustomScrollbar.min.js'></script>
        <script type='text/javascript' src="<?php echo $this->webroot; ?>js/plugins/uniform/jquery.uniform.min.js"></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/datatables/jquery.dataTables.min.js'></script>

        <script type='text/javascript' src="<?php echo $this->webroot; ?>js/plugins/fullcalendar/fullcalendar.min.js"></script>

        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/shbrush/XRegExp.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/shbrush/shCore.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/shbrush/shBrushXml.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/shbrush/shBrushJScript.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins/shbrush/shBrushCss.js'></script>    

        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/plugins.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/charts.js'></script>
        <script type='text/javascript' src='<?php echo $this->webroot; ?>js/actions.js'></script>
    </head>
    <body>  

        <div id="loader"><img src="<?php echo $this->webroot; ?>img/loader.gif"/></div>
        <div class="wrapper">


            <?php if ($this->Session->read('Auth.User.role') == 'admin'): ?>
                <?php echo $this->element('sidebar/administrador'); ?>
            <?php endif; ?>
            <?php if ($this->Session->read('Auth.User.role') == 'regional'): ?>
                <?php echo $this->element('sidebar/regional'); ?>
            <?php endif; ?>
            <?php if ($this->Session->read('Auth.User.role') == 'megadiler'): ?>
                <?php echo $this->element('sidebar/megadilers'); ?>
            <?php endif; ?>
            <?php if ($this->Session->read('Auth.User.role') == 'diler'): ?>
                <?php echo $this->element('sidebar/dilers'); ?>
            <?php endif; ?>



            <div class="body">
                <?php echo $this->Session->flash(); ?>

                <?php if ($this->Session->read('Auth.User.role') == 'admin'): ?>
                    <?php echo $this->element('menu/administrador'); ?>
                <?php endif; ?>
                <?php if ($this->Session->read('Auth.User.role') == 'regional'): ?>
                    <?php echo $this->element('menu/regional'); ?>
                <?php endif; ?>
                <?php if ($this->Session->read('Auth.User.role') == 'megadiler'): ?>
                    <?php echo $this->element('menu/megadilers'); ?>
                <?php endif; ?>
                <?php if ($this->Session->read('Auth.User.role') == 'diler'): ?>
                    <?php echo $this->element('menu/dilers'); ?>
                <?php endif; ?>          

                <div class="content">

                    <div id="contenidopagina">
                        <?php echo $this->fetch('content'); ?>
                    </div>  
                </div>            
            </div>        
        </div>  
        
        
        <div id="bModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            
            <div id="contenidomodal">
            </div>
        
        </div> 
        
        
        </div>                          
    </body>
</html>
<?php echo $this->Js->writeBuffer(); ?>